{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\n\n/**\n * Logic:\n *  When `mode` === `picker`,\n *  click will trigger `onSelect` (if value changed trigger `onChange` also).\n *  Panel change will not trigger `onSelect` but trigger `onPanelChange`\n */\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport warning from \"rc-util/es/warning\";\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport TimePanel from \"./panels/TimePanel\";\nimport DatetimePanel from \"./panels/DatetimePanel\";\nimport DatePanel from \"./panels/DatePanel\";\nimport WeekPanel from \"./panels/WeekPanel\";\nimport MonthPanel from \"./panels/MonthPanel\";\nimport QuarterPanel from \"./panels/QuarterPanel\";\nimport YearPanel from \"./panels/YearPanel\";\nimport DecadePanel from \"./panels/DecadePanel\";\nimport { isEqual } from \"./utils/dateUtil\";\nimport PanelContext from \"./PanelContext\";\nimport { PickerModeMap } from \"./utils/uiUtil\";\nimport RangeContext from \"./RangeContext\";\nimport getExtraFooter from \"./utils/getExtraFooter\";\nimport getRanges from \"./utils/getRanges\";\nimport { getLowerBoundTime, setDateTime, setTime } from \"./utils/timeUtil\";\nfunction PickerPanel(props) {\n  var _classNames;\n  var _ref = props,\n    _ref$prefixCls = _ref.prefixCls,\n    prefixCls = _ref$prefixCls === void 0 ? 'rc-picker' : _ref$prefixCls,\n    className = _ref.className,\n    style = _ref.style,\n    locale = _ref.locale,\n    generateConfig = _ref.generateConfig,\n    value = _ref.value,\n    defaultValue = _ref.defaultValue,\n    pickerValue = _ref.pickerValue,\n    defaultPickerValue = _ref.defaultPickerValue,\n    disabledDate = _ref.disabledDate,\n    mode = _ref.mode,\n    _ref$picker = _ref.picker,\n    picker = _ref$picker === void 0 ? 'date' : _ref$picker,\n    _ref$tabIndex = _ref.tabIndex,\n    tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex,\n    showNow = _ref.showNow,\n    showTime = _ref.showTime,\n    showToday = _ref.showToday,\n    renderExtraFooter = _ref.renderExtraFooter,\n    hideHeader = _ref.hideHeader,\n    onSelect = _ref.onSelect,\n    onChange = _ref.onChange,\n    onPanelChange = _ref.onPanelChange,\n    onMouseDown = _ref.onMouseDown,\n    onPickerValueChange = _ref.onPickerValueChange,\n    _onOk = _ref.onOk,\n    components = _ref.components,\n    direction = _ref.direction,\n    _ref$hourStep = _ref.hourStep,\n    hourStep = _ref$hourStep === void 0 ? 1 : _ref$hourStep,\n    _ref$minuteStep = _ref.minuteStep,\n    minuteStep = _ref$minuteStep === void 0 ? 1 : _ref$minuteStep,\n    _ref$secondStep = _ref.secondStep,\n    secondStep = _ref$secondStep === void 0 ? 1 : _ref$secondStep;\n  var needConfirmButton = picker === 'date' && !!showTime || picker === 'time';\n  var isHourStepValid = 24 % hourStep === 0;\n  var isMinuteStepValid = 60 % minuteStep === 0;\n  var isSecondStepValid = 60 % secondStep === 0;\n  if (process.env.NODE_ENV !== 'production') {\n    warning(!value || generateConfig.isValidate(value), 'Invalidate date pass to `value`.');\n    warning(!value || generateConfig.isValidate(value), 'Invalidate date pass to `defaultValue`.');\n    warning(isHourStepValid, \"`hourStep` \".concat(hourStep, \" is invalid. It should be a factor of 24.\"));\n    warning(isMinuteStepValid, \"`minuteStep` \".concat(minuteStep, \" is invalid. It should be a factor of 60.\"));\n    warning(isSecondStepValid, \"`secondStep` \".concat(secondStep, \" is invalid. It should be a factor of 60.\"));\n  } // ============================ State =============================\n\n  var panelContext = React.useContext(PanelContext);\n  var operationRef = panelContext.operationRef,\n    onContextSelect = panelContext.onSelect,\n    hideRanges = panelContext.hideRanges,\n    defaultOpenValue = panelContext.defaultOpenValue;\n  var _React$useContext = React.useContext(RangeContext),\n    inRange = _React$useContext.inRange,\n    panelPosition = _React$useContext.panelPosition,\n    rangedValue = _React$useContext.rangedValue,\n    hoverRangedValue = _React$useContext.hoverRangedValue;\n  var panelRef = React.useRef({}); // Handle init logic\n\n  var initRef = React.useRef(true); // Value\n\n  var _useMergedState = useMergedState(null, {\n      value: value,\n      defaultValue: defaultValue,\n      postState: function postState(val) {\n        if (!val && defaultOpenValue && picker === 'time') {\n          return defaultOpenValue;\n        }\n        return val;\n      }\n    }),\n    _useMergedState2 = _slicedToArray(_useMergedState, 2),\n    mergedValue = _useMergedState2[0],\n    setInnerValue = _useMergedState2[1]; // View date control\n\n  var _useMergedState3 = useMergedState(null, {\n      value: pickerValue,\n      defaultValue: defaultPickerValue || mergedValue,\n      postState: function postState(date) {\n        var now = generateConfig.getNow();\n        if (!date) {\n          return now;\n        } // When value is null and set showTime\n\n        if (!mergedValue && showTime) {\n          var defaultDateObject = _typeof(showTime) === 'object' ? showTime.defaultValue : defaultValue;\n          return setDateTime(generateConfig, Array.isArray(date) ? date[0] : date, defaultDateObject || now);\n        }\n        return Array.isArray(date) ? date[0] : date;\n      }\n    }),\n    _useMergedState4 = _slicedToArray(_useMergedState3, 2),\n    viewDate = _useMergedState4[0],\n    setInnerViewDate = _useMergedState4[1];\n  var setViewDate = function setViewDate(date) {\n    setInnerViewDate(date);\n    if (onPickerValueChange) {\n      onPickerValueChange(date);\n    }\n  }; // Panel control\n\n  var getInternalNextMode = function getInternalNextMode(nextMode) {\n    var getNextMode = PickerModeMap[picker];\n    if (getNextMode) {\n      return getNextMode(nextMode);\n    }\n    return nextMode;\n  }; // Save panel is changed from which panel\n\n  var _useMergedState5 = useMergedState(function () {\n      if (picker === 'time') {\n        return 'time';\n      }\n      return getInternalNextMode('date');\n    }, {\n      value: mode\n    }),\n    _useMergedState6 = _slicedToArray(_useMergedState5, 2),\n    mergedMode = _useMergedState6[0],\n    setInnerMode = _useMergedState6[1];\n  React.useEffect(function () {\n    setInnerMode(picker);\n  }, [picker]);\n  var _React$useState = React.useState(function () {\n      return mergedMode;\n    }),\n    _React$useState2 = _slicedToArray(_React$useState, 2),\n    sourceMode = _React$useState2[0],\n    setSourceMode = _React$useState2[1];\n  var onInternalPanelChange = function onInternalPanelChange(newMode, viewValue) {\n    var nextMode = getInternalNextMode(newMode || mergedMode);\n    setSourceMode(mergedMode);\n    setInnerMode(nextMode);\n    if (onPanelChange && (mergedMode !== nextMode || isEqual(generateConfig, viewDate, viewDate))) {\n      onPanelChange(viewValue, nextMode);\n    }\n  };\n  var triggerSelect = function triggerSelect(date, type) {\n    var forceTriggerSelect = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n    if (mergedMode === picker || forceTriggerSelect) {\n      setInnerValue(date);\n      if (onSelect) {\n        onSelect(date);\n      }\n      if (onContextSelect) {\n        onContextSelect(date, type);\n      }\n      if (onChange && !isEqual(generateConfig, date, mergedValue) && !(disabledDate !== null && disabledDate !== void 0 && disabledDate(date))) {\n        onChange(date);\n      }\n    }\n  }; // ========================= Interactive ==========================\n\n  var onInternalKeyDown = function onInternalKeyDown(e) {\n    if (panelRef.current && panelRef.current.onKeyDown) {\n      if ([KeyCode.LEFT, KeyCode.RIGHT, KeyCode.UP, KeyCode.DOWN, KeyCode.PAGE_UP, KeyCode.PAGE_DOWN, KeyCode.ENTER].includes(e.which)) {\n        e.preventDefault();\n      }\n      return panelRef.current.onKeyDown(e);\n    }\n    /* istanbul ignore next */\n\n    /* eslint-disable no-lone-blocks */\n\n    {\n      warning(false, 'Panel not correct handle keyDown event. Please help to fire issue about this.');\n      return false;\n    }\n    /* eslint-enable no-lone-blocks */\n  };\n\n  var onInternalBlur = function onInternalBlur(e) {\n    if (panelRef.current && panelRef.current.onBlur) {\n      panelRef.current.onBlur(e);\n    }\n  };\n  if (operationRef && panelPosition !== 'right') {\n    operationRef.current = {\n      onKeyDown: onInternalKeyDown,\n      onClose: function onClose() {\n        if (panelRef.current && panelRef.current.onClose) {\n          panelRef.current.onClose();\n        }\n      }\n    };\n  } // ============================ Effect ============================\n\n  React.useEffect(function () {\n    if (value && !initRef.current) {\n      setInnerViewDate(value);\n    }\n  }, [value]);\n  React.useEffect(function () {\n    initRef.current = false;\n  }, []); // ============================ Panels ============================\n\n  var panelNode;\n  var pickerProps = _objectSpread(_objectSpread({}, props), {}, {\n    operationRef: panelRef,\n    prefixCls: prefixCls,\n    viewDate: viewDate,\n    value: mergedValue,\n    onViewDateChange: setViewDate,\n    sourceMode: sourceMode,\n    onPanelChange: onInternalPanelChange,\n    disabledDate: disabledDate\n  });\n  delete pickerProps.onChange;\n  delete pickerProps.onSelect;\n  switch (mergedMode) {\n    case 'decade':\n      panelNode = /*#__PURE__*/React.createElement(DecadePanel, _extends({}, pickerProps, {\n        onSelect: function onSelect(date, type) {\n          setViewDate(date);\n          triggerSelect(date, type);\n        }\n      }));\n      break;\n    case 'year':\n      panelNode = /*#__PURE__*/React.createElement(YearPanel, _extends({}, pickerProps, {\n        onSelect: function onSelect(date, type) {\n          setViewDate(date);\n          triggerSelect(date, type);\n        }\n      }));\n      break;\n    case 'month':\n      panelNode = /*#__PURE__*/React.createElement(MonthPanel, _extends({}, pickerProps, {\n        onSelect: function onSelect(date, type) {\n          setViewDate(date);\n          triggerSelect(date, type);\n        }\n      }));\n      break;\n    case 'quarter':\n      panelNode = /*#__PURE__*/React.createElement(QuarterPanel, _extends({}, pickerProps, {\n        onSelect: function onSelect(date, type) {\n          setViewDate(date);\n          triggerSelect(date, type);\n        }\n      }));\n      break;\n    case 'week':\n      panelNode = /*#__PURE__*/React.createElement(WeekPanel, _extends({}, pickerProps, {\n        onSelect: function onSelect(date, type) {\n          setViewDate(date);\n          triggerSelect(date, type);\n        }\n      }));\n      break;\n    case 'time':\n      delete pickerProps.showTime;\n      panelNode = /*#__PURE__*/React.createElement(TimePanel, _extends({}, pickerProps, _typeof(showTime) === 'object' ? showTime : null, {\n        onSelect: function onSelect(date, type) {\n          setViewDate(date);\n          triggerSelect(date, type);\n        }\n      }));\n      break;\n    default:\n      if (showTime) {\n        panelNode = /*#__PURE__*/React.createElement(DatetimePanel, _extends({}, pickerProps, {\n          onSelect: function onSelect(date, type) {\n            setViewDate(date);\n            triggerSelect(date, type);\n          }\n        }));\n      } else {\n        panelNode = /*#__PURE__*/React.createElement(DatePanel, _extends({}, pickerProps, {\n          onSelect: function onSelect(date, type) {\n            setViewDate(date);\n            triggerSelect(date, type);\n          }\n        }));\n      }\n  } // ============================ Footer ============================\n\n  var extraFooter;\n  var rangesNode;\n  var onNow = function onNow() {\n    var now = generateConfig.getNow();\n    var lowerBoundTime = getLowerBoundTime(generateConfig.getHour(now), generateConfig.getMinute(now), generateConfig.getSecond(now), isHourStepValid ? hourStep : 1, isMinuteStepValid ? minuteStep : 1, isSecondStepValid ? secondStep : 1);\n    var adjustedNow = setTime(generateConfig, now, lowerBoundTime[0],\n    // hour\n    lowerBoundTime[1],\n    // minute\n    lowerBoundTime[2] // second\n    );\n\n    triggerSelect(adjustedNow, 'submit');\n  };\n  if (!hideRanges) {\n    extraFooter = getExtraFooter(prefixCls, mergedMode, renderExtraFooter);\n    rangesNode = getRanges({\n      prefixCls: prefixCls,\n      components: components,\n      needConfirmButton: needConfirmButton,\n      okDisabled: !mergedValue || disabledDate && disabledDate(mergedValue),\n      locale: locale,\n      showNow: showNow,\n      onNow: needConfirmButton && onNow,\n      onOk: function onOk() {\n        if (mergedValue) {\n          triggerSelect(mergedValue, 'submit', true);\n          if (_onOk) {\n            _onOk(mergedValue);\n          }\n        }\n      }\n    });\n  }\n  var todayNode;\n  if (showToday && mergedMode === 'date' && picker === 'date' && !showTime) {\n    var now = generateConfig.getNow();\n    var todayCls = \"\".concat(prefixCls, \"-today-btn\");\n    var disabled = disabledDate && disabledDate(now);\n    todayNode = /*#__PURE__*/React.createElement(\"a\", {\n      className: classNames(todayCls, disabled && \"\".concat(todayCls, \"-disabled\")),\n      \"aria-disabled\": disabled,\n      onClick: function onClick() {\n        if (!disabled) {\n          triggerSelect(now, 'mouse', true);\n        }\n      }\n    }, locale.today);\n  }\n  return /*#__PURE__*/React.createElement(PanelContext.Provider, {\n    value: _objectSpread(_objectSpread({}, panelContext), {}, {\n      mode: mergedMode,\n      hideHeader: 'hideHeader' in props ? hideHeader : panelContext.hideHeader,\n      hidePrevBtn: inRange && panelPosition === 'right',\n      hideNextBtn: inRange && panelPosition === 'left'\n    })\n  }, /*#__PURE__*/React.createElement(\"div\", {\n    tabIndex: tabIndex,\n    className: classNames(\"\".concat(prefixCls, \"-panel\"), className, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-panel-has-range\"), rangedValue && rangedValue[0] && rangedValue[1]), _defineProperty(_classNames, \"\".concat(prefixCls, \"-panel-has-range-hover\"), hoverRangedValue && hoverRangedValue[0] && hoverRangedValue[1]), _defineProperty(_classNames, \"\".concat(prefixCls, \"-panel-rtl\"), direction === 'rtl'), _classNames)),\n    style: style,\n    onKeyDown: onInternalKeyDown,\n    onBlur: onInternalBlur,\n    onMouseDown: onMouseDown\n  }, panelNode, extraFooter || rangesNode || todayNode ? /*#__PURE__*/React.createElement(\"div\", {\n    className: \"\".concat(prefixCls, \"-footer\")\n  }, extraFooter, rangesNode, todayNode) : null));\n}\nexport default PickerPanel;\n/* eslint-enable */","map":{"version":3,"names":["_defineProperty","_extends","_objectSpread","_typeof","_slicedToArray","React","classNames","KeyCode","warning","useMergedState","TimePanel","DatetimePanel","DatePanel","WeekPanel","MonthPanel","QuarterPanel","YearPanel","DecadePanel","isEqual","PanelContext","PickerModeMap","RangeContext","getExtraFooter","getRanges","getLowerBoundTime","setDateTime","setTime","PickerPanel","props","_classNames","_ref","_ref$prefixCls","prefixCls","className","style","locale","generateConfig","value","defaultValue","pickerValue","defaultPickerValue","disabledDate","mode","_ref$picker","picker","_ref$tabIndex","tabIndex","showNow","showTime","showToday","renderExtraFooter","hideHeader","onSelect","onChange","onPanelChange","onMouseDown","onPickerValueChange","_onOk","onOk","components","direction","_ref$hourStep","hourStep","_ref$minuteStep","minuteStep","_ref$secondStep","secondStep","needConfirmButton","isHourStepValid","isMinuteStepValid","isSecondStepValid","process","env","NODE_ENV","isValidate","concat","panelContext","useContext","operationRef","onContextSelect","hideRanges","defaultOpenValue","_React$useContext","inRange","panelPosition","rangedValue","hoverRangedValue","panelRef","useRef","initRef","_useMergedState","postState","val","_useMergedState2","mergedValue","setInnerValue","_useMergedState3","date","now","getNow","defaultDateObject","Array","isArray","_useMergedState4","viewDate","setInnerViewDate","setViewDate","getInternalNextMode","nextMode","getNextMode","_useMergedState5","_useMergedState6","mergedMode","setInnerMode","useEffect","_React$useState","useState","_React$useState2","sourceMode","setSourceMode","onInternalPanelChange","newMode","viewValue","triggerSelect","type","forceTriggerSelect","arguments","length","undefined","onInternalKeyDown","e","current","onKeyDown","LEFT","RIGHT","UP","DOWN","PAGE_UP","PAGE_DOWN","ENTER","includes","which","preventDefault","onInternalBlur","onBlur","onClose","panelNode","pickerProps","onViewDateChange","createElement","extraFooter","rangesNode","onNow","lowerBoundTime","getHour","getMinute","getSecond","adjustedNow","okDisabled","todayNode","todayCls","disabled","onClick","today","Provider","hidePrevBtn","hideNextBtn"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/rc-picker/es/PickerPanel.js"],"sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\n\n/**\n * Logic:\n *  When `mode` === `picker`,\n *  click will trigger `onSelect` (if value changed trigger `onChange` also).\n *  Panel change will not trigger `onSelect` but trigger `onPanelChange`\n */\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport warning from \"rc-util/es/warning\";\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport TimePanel from \"./panels/TimePanel\";\nimport DatetimePanel from \"./panels/DatetimePanel\";\nimport DatePanel from \"./panels/DatePanel\";\nimport WeekPanel from \"./panels/WeekPanel\";\nimport MonthPanel from \"./panels/MonthPanel\";\nimport QuarterPanel from \"./panels/QuarterPanel\";\nimport YearPanel from \"./panels/YearPanel\";\nimport DecadePanel from \"./panels/DecadePanel\";\nimport { isEqual } from \"./utils/dateUtil\";\nimport PanelContext from \"./PanelContext\";\nimport { PickerModeMap } from \"./utils/uiUtil\";\nimport RangeContext from \"./RangeContext\";\nimport getExtraFooter from \"./utils/getExtraFooter\";\nimport getRanges from \"./utils/getRanges\";\nimport { getLowerBoundTime, setDateTime, setTime } from \"./utils/timeUtil\";\n\nfunction PickerPanel(props) {\n  var _classNames;\n\n  var _ref = props,\n      _ref$prefixCls = _ref.prefixCls,\n      prefixCls = _ref$prefixCls === void 0 ? 'rc-picker' : _ref$prefixCls,\n      className = _ref.className,\n      style = _ref.style,\n      locale = _ref.locale,\n      generateConfig = _ref.generateConfig,\n      value = _ref.value,\n      defaultValue = _ref.defaultValue,\n      pickerValue = _ref.pickerValue,\n      defaultPickerValue = _ref.defaultPickerValue,\n      disabledDate = _ref.disabledDate,\n      mode = _ref.mode,\n      _ref$picker = _ref.picker,\n      picker = _ref$picker === void 0 ? 'date' : _ref$picker,\n      _ref$tabIndex = _ref.tabIndex,\n      tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex,\n      showNow = _ref.showNow,\n      showTime = _ref.showTime,\n      showToday = _ref.showToday,\n      renderExtraFooter = _ref.renderExtraFooter,\n      hideHeader = _ref.hideHeader,\n      onSelect = _ref.onSelect,\n      onChange = _ref.onChange,\n      onPanelChange = _ref.onPanelChange,\n      onMouseDown = _ref.onMouseDown,\n      onPickerValueChange = _ref.onPickerValueChange,\n      _onOk = _ref.onOk,\n      components = _ref.components,\n      direction = _ref.direction,\n      _ref$hourStep = _ref.hourStep,\n      hourStep = _ref$hourStep === void 0 ? 1 : _ref$hourStep,\n      _ref$minuteStep = _ref.minuteStep,\n      minuteStep = _ref$minuteStep === void 0 ? 1 : _ref$minuteStep,\n      _ref$secondStep = _ref.secondStep,\n      secondStep = _ref$secondStep === void 0 ? 1 : _ref$secondStep;\n  var needConfirmButton = picker === 'date' && !!showTime || picker === 'time';\n  var isHourStepValid = 24 % hourStep === 0;\n  var isMinuteStepValid = 60 % minuteStep === 0;\n  var isSecondStepValid = 60 % secondStep === 0;\n\n  if (process.env.NODE_ENV !== 'production') {\n    warning(!value || generateConfig.isValidate(value), 'Invalidate date pass to `value`.');\n    warning(!value || generateConfig.isValidate(value), 'Invalidate date pass to `defaultValue`.');\n    warning(isHourStepValid, \"`hourStep` \".concat(hourStep, \" is invalid. It should be a factor of 24.\"));\n    warning(isMinuteStepValid, \"`minuteStep` \".concat(minuteStep, \" is invalid. It should be a factor of 60.\"));\n    warning(isSecondStepValid, \"`secondStep` \".concat(secondStep, \" is invalid. It should be a factor of 60.\"));\n  } // ============================ State =============================\n\n\n  var panelContext = React.useContext(PanelContext);\n  var operationRef = panelContext.operationRef,\n      onContextSelect = panelContext.onSelect,\n      hideRanges = panelContext.hideRanges,\n      defaultOpenValue = panelContext.defaultOpenValue;\n\n  var _React$useContext = React.useContext(RangeContext),\n      inRange = _React$useContext.inRange,\n      panelPosition = _React$useContext.panelPosition,\n      rangedValue = _React$useContext.rangedValue,\n      hoverRangedValue = _React$useContext.hoverRangedValue;\n\n  var panelRef = React.useRef({}); // Handle init logic\n\n  var initRef = React.useRef(true); // Value\n\n  var _useMergedState = useMergedState(null, {\n    value: value,\n    defaultValue: defaultValue,\n    postState: function postState(val) {\n      if (!val && defaultOpenValue && picker === 'time') {\n        return defaultOpenValue;\n      }\n\n      return val;\n    }\n  }),\n      _useMergedState2 = _slicedToArray(_useMergedState, 2),\n      mergedValue = _useMergedState2[0],\n      setInnerValue = _useMergedState2[1]; // View date control\n\n\n  var _useMergedState3 = useMergedState(null, {\n    value: pickerValue,\n    defaultValue: defaultPickerValue || mergedValue,\n    postState: function postState(date) {\n      var now = generateConfig.getNow();\n\n      if (!date) {\n        return now;\n      } // When value is null and set showTime\n\n\n      if (!mergedValue && showTime) {\n        var defaultDateObject = _typeof(showTime) === 'object' ? showTime.defaultValue : defaultValue;\n        return setDateTime(generateConfig, Array.isArray(date) ? date[0] : date, defaultDateObject || now);\n      }\n\n      return Array.isArray(date) ? date[0] : date;\n    }\n  }),\n      _useMergedState4 = _slicedToArray(_useMergedState3, 2),\n      viewDate = _useMergedState4[0],\n      setInnerViewDate = _useMergedState4[1];\n\n  var setViewDate = function setViewDate(date) {\n    setInnerViewDate(date);\n\n    if (onPickerValueChange) {\n      onPickerValueChange(date);\n    }\n  }; // Panel control\n\n\n  var getInternalNextMode = function getInternalNextMode(nextMode) {\n    var getNextMode = PickerModeMap[picker];\n\n    if (getNextMode) {\n      return getNextMode(nextMode);\n    }\n\n    return nextMode;\n  }; // Save panel is changed from which panel\n\n\n  var _useMergedState5 = useMergedState(function () {\n    if (picker === 'time') {\n      return 'time';\n    }\n\n    return getInternalNextMode('date');\n  }, {\n    value: mode\n  }),\n      _useMergedState6 = _slicedToArray(_useMergedState5, 2),\n      mergedMode = _useMergedState6[0],\n      setInnerMode = _useMergedState6[1];\n\n  React.useEffect(function () {\n    setInnerMode(picker);\n  }, [picker]);\n\n  var _React$useState = React.useState(function () {\n    return mergedMode;\n  }),\n      _React$useState2 = _slicedToArray(_React$useState, 2),\n      sourceMode = _React$useState2[0],\n      setSourceMode = _React$useState2[1];\n\n  var onInternalPanelChange = function onInternalPanelChange(newMode, viewValue) {\n    var nextMode = getInternalNextMode(newMode || mergedMode);\n    setSourceMode(mergedMode);\n    setInnerMode(nextMode);\n\n    if (onPanelChange && (mergedMode !== nextMode || isEqual(generateConfig, viewDate, viewDate))) {\n      onPanelChange(viewValue, nextMode);\n    }\n  };\n\n  var triggerSelect = function triggerSelect(date, type) {\n    var forceTriggerSelect = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n    if (mergedMode === picker || forceTriggerSelect) {\n      setInnerValue(date);\n\n      if (onSelect) {\n        onSelect(date);\n      }\n\n      if (onContextSelect) {\n        onContextSelect(date, type);\n      }\n\n      if (onChange && !isEqual(generateConfig, date, mergedValue) && !(disabledDate !== null && disabledDate !== void 0 && disabledDate(date))) {\n        onChange(date);\n      }\n    }\n  }; // ========================= Interactive ==========================\n\n\n  var onInternalKeyDown = function onInternalKeyDown(e) {\n    if (panelRef.current && panelRef.current.onKeyDown) {\n      if ([KeyCode.LEFT, KeyCode.RIGHT, KeyCode.UP, KeyCode.DOWN, KeyCode.PAGE_UP, KeyCode.PAGE_DOWN, KeyCode.ENTER].includes(e.which)) {\n        e.preventDefault();\n      }\n\n      return panelRef.current.onKeyDown(e);\n    }\n    /* istanbul ignore next */\n\n    /* eslint-disable no-lone-blocks */\n\n\n    {\n      warning(false, 'Panel not correct handle keyDown event. Please help to fire issue about this.');\n      return false;\n    }\n    /* eslint-enable no-lone-blocks */\n  };\n\n  var onInternalBlur = function onInternalBlur(e) {\n    if (panelRef.current && panelRef.current.onBlur) {\n      panelRef.current.onBlur(e);\n    }\n  };\n\n  if (operationRef && panelPosition !== 'right') {\n    operationRef.current = {\n      onKeyDown: onInternalKeyDown,\n      onClose: function onClose() {\n        if (panelRef.current && panelRef.current.onClose) {\n          panelRef.current.onClose();\n        }\n      }\n    };\n  } // ============================ Effect ============================\n\n\n  React.useEffect(function () {\n    if (value && !initRef.current) {\n      setInnerViewDate(value);\n    }\n  }, [value]);\n  React.useEffect(function () {\n    initRef.current = false;\n  }, []); // ============================ Panels ============================\n\n  var panelNode;\n\n  var pickerProps = _objectSpread(_objectSpread({}, props), {}, {\n    operationRef: panelRef,\n    prefixCls: prefixCls,\n    viewDate: viewDate,\n    value: mergedValue,\n    onViewDateChange: setViewDate,\n    sourceMode: sourceMode,\n    onPanelChange: onInternalPanelChange,\n    disabledDate: disabledDate\n  });\n\n  delete pickerProps.onChange;\n  delete pickerProps.onSelect;\n\n  switch (mergedMode) {\n    case 'decade':\n      panelNode = /*#__PURE__*/React.createElement(DecadePanel, _extends({}, pickerProps, {\n        onSelect: function onSelect(date, type) {\n          setViewDate(date);\n          triggerSelect(date, type);\n        }\n      }));\n      break;\n\n    case 'year':\n      panelNode = /*#__PURE__*/React.createElement(YearPanel, _extends({}, pickerProps, {\n        onSelect: function onSelect(date, type) {\n          setViewDate(date);\n          triggerSelect(date, type);\n        }\n      }));\n      break;\n\n    case 'month':\n      panelNode = /*#__PURE__*/React.createElement(MonthPanel, _extends({}, pickerProps, {\n        onSelect: function onSelect(date, type) {\n          setViewDate(date);\n          triggerSelect(date, type);\n        }\n      }));\n      break;\n\n    case 'quarter':\n      panelNode = /*#__PURE__*/React.createElement(QuarterPanel, _extends({}, pickerProps, {\n        onSelect: function onSelect(date, type) {\n          setViewDate(date);\n          triggerSelect(date, type);\n        }\n      }));\n      break;\n\n    case 'week':\n      panelNode = /*#__PURE__*/React.createElement(WeekPanel, _extends({}, pickerProps, {\n        onSelect: function onSelect(date, type) {\n          setViewDate(date);\n          triggerSelect(date, type);\n        }\n      }));\n      break;\n\n    case 'time':\n      delete pickerProps.showTime;\n      panelNode = /*#__PURE__*/React.createElement(TimePanel, _extends({}, pickerProps, _typeof(showTime) === 'object' ? showTime : null, {\n        onSelect: function onSelect(date, type) {\n          setViewDate(date);\n          triggerSelect(date, type);\n        }\n      }));\n      break;\n\n    default:\n      if (showTime) {\n        panelNode = /*#__PURE__*/React.createElement(DatetimePanel, _extends({}, pickerProps, {\n          onSelect: function onSelect(date, type) {\n            setViewDate(date);\n            triggerSelect(date, type);\n          }\n        }));\n      } else {\n        panelNode = /*#__PURE__*/React.createElement(DatePanel, _extends({}, pickerProps, {\n          onSelect: function onSelect(date, type) {\n            setViewDate(date);\n            triggerSelect(date, type);\n          }\n        }));\n      }\n\n  } // ============================ Footer ============================\n\n\n  var extraFooter;\n  var rangesNode;\n\n  var onNow = function onNow() {\n    var now = generateConfig.getNow();\n    var lowerBoundTime = getLowerBoundTime(generateConfig.getHour(now), generateConfig.getMinute(now), generateConfig.getSecond(now), isHourStepValid ? hourStep : 1, isMinuteStepValid ? minuteStep : 1, isSecondStepValid ? secondStep : 1);\n    var adjustedNow = setTime(generateConfig, now, lowerBoundTime[0], // hour\n    lowerBoundTime[1], // minute\n    lowerBoundTime[2] // second\n    );\n    triggerSelect(adjustedNow, 'submit');\n  };\n\n  if (!hideRanges) {\n    extraFooter = getExtraFooter(prefixCls, mergedMode, renderExtraFooter);\n    rangesNode = getRanges({\n      prefixCls: prefixCls,\n      components: components,\n      needConfirmButton: needConfirmButton,\n      okDisabled: !mergedValue || disabledDate && disabledDate(mergedValue),\n      locale: locale,\n      showNow: showNow,\n      onNow: needConfirmButton && onNow,\n      onOk: function onOk() {\n        if (mergedValue) {\n          triggerSelect(mergedValue, 'submit', true);\n\n          if (_onOk) {\n            _onOk(mergedValue);\n          }\n        }\n      }\n    });\n  }\n\n  var todayNode;\n\n  if (showToday && mergedMode === 'date' && picker === 'date' && !showTime) {\n    var now = generateConfig.getNow();\n    var todayCls = \"\".concat(prefixCls, \"-today-btn\");\n    var disabled = disabledDate && disabledDate(now);\n    todayNode = /*#__PURE__*/React.createElement(\"a\", {\n      className: classNames(todayCls, disabled && \"\".concat(todayCls, \"-disabled\")),\n      \"aria-disabled\": disabled,\n      onClick: function onClick() {\n        if (!disabled) {\n          triggerSelect(now, 'mouse', true);\n        }\n      }\n    }, locale.today);\n  }\n\n  return /*#__PURE__*/React.createElement(PanelContext.Provider, {\n    value: _objectSpread(_objectSpread({}, panelContext), {}, {\n      mode: mergedMode,\n      hideHeader: 'hideHeader' in props ? hideHeader : panelContext.hideHeader,\n      hidePrevBtn: inRange && panelPosition === 'right',\n      hideNextBtn: inRange && panelPosition === 'left'\n    })\n  }, /*#__PURE__*/React.createElement(\"div\", {\n    tabIndex: tabIndex,\n    className: classNames(\"\".concat(prefixCls, \"-panel\"), className, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-panel-has-range\"), rangedValue && rangedValue[0] && rangedValue[1]), _defineProperty(_classNames, \"\".concat(prefixCls, \"-panel-has-range-hover\"), hoverRangedValue && hoverRangedValue[0] && hoverRangedValue[1]), _defineProperty(_classNames, \"\".concat(prefixCls, \"-panel-rtl\"), direction === 'rtl'), _classNames)),\n    style: style,\n    onKeyDown: onInternalKeyDown,\n    onBlur: onInternalBlur,\n    onMouseDown: onMouseDown\n  }, panelNode, extraFooter || rangesNode || todayNode ? /*#__PURE__*/React.createElement(\"div\", {\n    className: \"\".concat(prefixCls, \"-footer\")\n  }, extraFooter, rangesNode, todayNode) : null));\n}\n\nexport default PickerPanel;\n/* eslint-enable */"],"mappings":"AAAA,OAAOA,eAAe,MAAM,2CAA2C;AACvE,OAAOC,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,aAAa,MAAM,0CAA0C;AACpE,OAAOC,OAAO,MAAM,mCAAmC;AACvD,OAAOC,cAAc,MAAM,0CAA0C;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,OAAO,MAAM,oBAAoB;AACxC,OAAOC,OAAO,MAAM,oBAAoB;AACxC,OAAOC,cAAc,MAAM,iCAAiC;AAC5D,OAAOC,SAAS,MAAM,oBAAoB;AAC1C,OAAOC,aAAa,MAAM,wBAAwB;AAClD,OAAOC,SAAS,MAAM,oBAAoB;AAC1C,OAAOC,SAAS,MAAM,oBAAoB;AAC1C,OAAOC,UAAU,MAAM,qBAAqB;AAC5C,OAAOC,YAAY,MAAM,uBAAuB;AAChD,OAAOC,SAAS,MAAM,oBAAoB;AAC1C,OAAOC,WAAW,MAAM,sBAAsB;AAC9C,SAASC,OAAO,QAAQ,kBAAkB;AAC1C,OAAOC,YAAY,MAAM,gBAAgB;AACzC,SAASC,aAAa,QAAQ,gBAAgB;AAC9C,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,cAAc,MAAM,wBAA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